//首页
'use strict';
import React, {Component} from 'react';
import Header from '../common/header'
import * as URLconstant from '../constant/URLconstant';
import Util from '../common/util'
import {
    View,
} from 'react-native';

export default class videoIndex extends Component {
    // 构造
    constructor(props) {
        super(props);
        // 初始状态
        this.state = {};
    }

    render() {
        let width =Util.size.width
        let height = Util.size.width
        let uri = 'https://v.qq.com/txp/iframe/player.html?vid='+this.props.uri
        let HTML = `
<!DOCTYPE>
<html style="width:100%;height:100%">
  <head>
    <title>Hello Static World</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
  </head>
  <style>
  html,body,div,iframe{padding:0;margin:0;}
</style>
  <body style="width:100%;height:100%;">
  <div>
 <iframe height=` + height + ` width=` + width + ` src='` + uri + `' frameborder=0></iframe>
</div>
  </body>
</html>
`;

        return (
            <View style={{flex: 1}}>
                <Header navigator={this.props.navigator} initObj={{title: this.props.title, id: 2}}/>
            </View>
        )
    }
}